package com.xiaojian.pick.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class Inform {
    private Integer id;     // 主键
    private String content; // 举报内容
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;    // 举报时间
    private Boolean state;  // 信息状态：0,未处理；1，已处理

    private User user;  // 举报者
    private Commodity commodity;    // 被举报的商品
    private Seek seek;      // 被举报的求购
    private Topic topic;    // 被举报的帖子

    public Inform(Integer id, String content, Date createTime, Boolean state, User user, Commodity commodity, Seek seek, Topic topic) {
        this.id = id;
        this.content = content;
        this.createTime = createTime;
        this.state = state;
        this.user = user;
        this.commodity = commodity;
        this.seek = seek;
        this.topic = topic;
    }

    public Inform() {
    }

    @Override
    public String toString() {
        return "Inform{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", state=" + state +
                ", user=" + user +
                ", commodity=" + commodity +
                ", seek=" + seek +
                ", topic=" + topic +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public Seek getSeek() {
        return seek;
    }

    public void setSeek(Seek seek) {
        this.seek = seek;
    }

    public Topic getTopic() {
        return topic;
    }

    public void setTopic(Topic topic) {
        this.topic = topic;
    }
}